home *** CD-ROM | disk | FTP | other *** search
/ Compendium Deluxe 1 / LSD Compendium Deluxe 1.iso / a / programming / misc / ada1110b.lha / Examples / Dine / roomspec.ada < prev    next >
Encoding:
Text File  |  1992-03-02  |  566 b   |  24 lines

  1. WITH Chop;
  2. WITH Phil;
  3. PACKAGE Room IS
  4.  
  5. -- Specification of dining room package, which exports a set of
  6. -- chopsticks and a head waiter task.
  7. --
  8. -- Michael B. Feldman, The George Washington University, November 1990.
  9.  
  10.  
  11.   Table_Size: CONSTANT := 5;
  12.   SUBTYPE Table_Type IS Positive RANGE 1..Table_Size;
  13.  
  14.   Sticks:     ARRAY(Table_Type) OF Chop.Stick;
  15.  
  16.   TASK Head_Waiter IS
  17.     ENTRY Open_The_Room;
  18.     ENTRY Report_State(Which_Phil: Table_Type;
  19.                        State: Phil.States;
  20.                        How_Long: Natural := 0);
  21.   END Head_Waiter;
  22.  
  23. END Room;
  24.